#include <iostream>
#include <algorithm>
#include <vector>

#include <cmath>
#include <cstring>
#include <cstdio>

using namespace std;
#define bip system("pause")
#define SET( ARRAY , VALUE ) memset( ARRAY, VALUE , sizeof(ARRAY) )

vector< pair<float, pair<float,float> > >vt;
int n,root[ (int)1e3 ],rank[ (int)1e3 ];
int result[ (int)1e3 ];

inline void Set() {
    int i;
    for(i=0; i<=(int)1e3; ++i) {
        root[i]=i;
        rank[i]=0;
    }
}
inline int Find(int X) {
    if( X != root[X] ) {
        root[X]=Find( root[X] );
    }
    return root[X];
}
inline void Union(int X , int Y ) {
    int rootx = Find(X);
    int rooty = Find(Y);
    if( rootx==rooty ) { // already intersect
        return ;
    } else if( rank[rootx] > rank[rooty] ) {
        root[ rooty ] =rootx;
    } else {
        root[ rootx ]=rooty;
    }

    if( rank[rootx]==rank[rooty] ){
        rank[rooty]+=1;
    }
}

inline void read() {
    int i;
    float x,y,r;
    vt.clear();

    for(i=1; i<=n; ++i) {
        scanf("%f %f %f",&x,&y,&r);
        vt.push_back( make_pair(x, make_pair(y,r) ) );
    }
}
inline float myAbs(float x ){
    return ( x < (float)0 ? -x : x ) ;
}
inline bool good(int i, int j) {
    float x = vt[i].first - vt[j].first;
    float y = vt[i].second.first - vt[j].second.first;
    float dist = sqrt( x*x + y*y );
    float r1 = vt[i].second.second;
    float r2 = vt[j].second.second;
    return ( (dist <= r1+r2) && ( myAbs(r1-r2) <= dist ) );
}

inline void proc() {
    Set();
    int i,j;
    for(i=0; i<n; ++i) {
        for(j=0; j<n; ++j) {
            if(good(i,j)==true) {
                    Union(i,j);
            }
        }
    }

}

inline void print(){
    int i;
    SET( result, 0 );
    for(i=0;i<=n;++i){
        result[ root[i] ]++;
    }
    int retval = result[0];
    if(n==0)retval=0;
    for(i=1;i<=n;++i){
        retval = max(retval, result[i]);
    }
    printf("The largest component contains %d ring",retval);
    if(retval>1 || retval==0){
        printf("s.\n");
    }
    else{
        printf(".\n");
    }

}
int main() {
    while( scanf("%d",&n)==1 ) {
        if(n==-1)break;
        read();
        proc();
        print();
    }

    return 0;
}
